import request from '@/http/axios'

// 查询固件信息列表
export function listFirmware(query) {
  return request({
    url: '/bus/firmware/list',
    method: 'get',
    params: query
  })
}

// 查询固件信息详细
export function getFirmware(firmwareId) {
  return request({
    url: '/bus/firmware/' + firmwareId,
    method: 'get'
  })
}

// 新增固件信息
export function addFirmware(data) {
  return request({
    url: '/bus/firmware',
    method: 'post',
    data: data
  })
}

// 修改固件信息
export function updateFirmware(data) {
  return request({
    url: '/bus/firmware',
    method: 'put',
    data: data
  })
}

// 删除固件信息
export function delFirmware(firmwareId,firmwareName) {
  return request({
    url: '/bus/firmware/' + firmwareId+'/'+firmwareName,
    method: 'delete'
  })
}
